# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Silvio Knizek (killermoehre)

pkgname=gnome-disk-utility
pkgver=3.24.1
pkgrel=1
pkgdesc="Disk Management Utility for GNOME"
url="https://git.gnome.org/browse/gnome-disk-utility"
arch=(i686 x86_64)
license=(GPL)
groups=(gnome)
depends=(udisks2 gtk3 libsecret libpwquality libcanberra libdvdread libnotify parted)
makedepends=(intltool docbook-xsl autoconf-archive appstream-glib git)
_commit=11929ddb59d020df35bc73b6e7e4edfd8aa65a26  # tags/3.24.1^0
source=("git+https://git.gnome.org/browse/gnome-disk-utility#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --disable-static --disable-Werror --libexecdir=/usr/lib/gnome-disk-utility
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}
